package com.gzhryc.shared_device.common.payment.dao.db;

import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.JoinField;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.shared_device.common.payment.dao.enums.AlipayConfigEnum;

import java.io.Serializable;
import java.util.Date;

@Table(name="payment_ali_pay_config")
public class AlipayConfig implements Serializable{

	private static final long serialVersionUID = 1L;

	@Id(auto = false)
	@Column(name = "app_id", note = "应用ID")
	protected String appId;

	@Column(name = "app_type", note = "应用类型")
	protected Integer appType;

	@Column(name = "app_public_key", note = "应用公钥", length = 1024)
	protected String appPublicKey;

	@Column(name = "app_private_key", note = "应用私钥", length = 2048)
	protected String appPrivateKey;

	@Column(name = "alipay_public_key", note = "支付宝支付公钥", length = 2048)
	protected String alipayPublicKey;
	
	@Column(name = "xcx_decrypt_key", note = "小程序解码密钥", length = 255)
	protected String xcxDecryptKey;

	@Column(note = "账号ID")
	protected String pid;

	@Column(name = "certificate_path",length=64)
	protected String certificatePath;

	@Column(name = "account_group_id", note = "账号组ID")
	protected Long accountGroupId;

	@Column(length = 64, note = "简介")
	protected String note;

	@Column(name = "update_date", autoUpdateTime = true)
	protected Date updateDate;

	@Column(name = "create_date")
	protected Date createDate;

	@JoinField(name="name",fromField = "account_group_id",toTable = "payment_account_group",type = "LEFT")
	protected String accountGroupName;

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

	public Integer getAppType() {
		return appType;
	}

	public void setAppType(Integer appType) {
		this.appType = appType;
	}

	public String getAppPublicKey() {
		return appPublicKey;
	}

	public void setAppPublicKey(String appPublicKey) {
		this.appPublicKey = appPublicKey;
	}

	public String getAppPrivateKey() {
		return appPrivateKey;
	}

	public void setAppPrivateKey(String appPrivateKey) {
		this.appPrivateKey = appPrivateKey;
	}

	public String getAlipayPublicKey() {
		return alipayPublicKey;
	}

	public void setAlipayPublicKey(String alipayPublicKey) {
		this.alipayPublicKey = alipayPublicKey;
	}

	public String getXcxDecryptKey() {
		return xcxDecryptKey;
	}

	public void setXcxDecryptKey(String xcxDecryptKey) {
		this.xcxDecryptKey = xcxDecryptKey;
	}

	public String getCertificatePath() {
		return certificatePath;
	}

	public void setCertificatePath(String certificatePath) {
		this.certificatePath = certificatePath;
	}

	public Long getAccountGroupId() {
		return accountGroupId;
	}

	public void setAccountGroupId(Long accountGroupId) {
		this.accountGroupId = accountGroupId;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getAccountGroupName() {
		return accountGroupName;
	}

	public void setAccountGroupName(String accountGroupName) {
		this.accountGroupName = accountGroupName;
	}

	public String getAppTypeName() {
		return AlipayConfigEnum.AppType.note(this.appType);
	}

}
